import axios from "../utils/http";

export class DetailApi {
  static getDetail(id: string) {
    return axios.get("/goods", {
      params: {
        id,
      },
    });
  }

  // id-商品id
  // type-1代表24小时热销榜，2代表周热销榜
  // limit-获取个数
  static getHotGoods(id: number, type: number, limit: number = 3) {
    return axios.get("/goods/hot", {
      params: {
        id,
        type,
        limit,
      },
    });
  }
}
